package com.neusoft.elmboot.util;

/**
 * @ClassName: ErrorCode
 * @Description:
 * @Author: 过河卒
 * @Date: 2022/1/14 20:06
 * @Version: 1.0
 */

public enum ErrorCode {

    OK(0,"succeed"),
    ERROR(1,"Failed"),

    ERROR_USER_NOT_EXIST(30001,"The user does not exist"),
    ERROR_WRONG_PASS(30002,"try with a wrong password"),
    FAIL_TO_PAY(30003,"payment failure"),

    ERROR_BUSINESS_NOT_EXIST(40003,"The business does not exist"),

    FAIL_TO_DELETE(50002,"fail to delete"),


    FAIL_TO_UDPATE(50003,"fail to update");




    private final int code;
    private final String message;

    ErrorCode(int code, String message){
        this.code = code;
        this.message = message;
    }
    public int getCode(){return code;}
    public String getMessage() {
        return message;
    }
}
